<%--
  Created by IntelliJ IDEA.
  User: JY
  Date: 2022/1/7
  Time: 9:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <%--<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.15.3/dist/bootstrap-table.min.css">--%>
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <%--<script src="https://unpkg.com/bootstrap-table@1.15.3/dist/bootstrap-table.min.js"></script>--%>
   <%-- <script src="../js/bootstrap-table-zh-CN.min.js"></script>--%>
    <style>
        .DIV_STYLE1{
            margin-left: 1000px;
        }
    </style>
</head>
<body>
    <table class="TABLE_STYLE2">
        <tbody><tr height="20" class="TR_STYLE1">
            <td class="TD_HANDBOOK_STYLE1"><span style="color: blue;font-family:华文宋体"><marquee width=400 direction=left align=middle><span>您正在做的业务是：产品设计--产品档案管理--产品档案登记</span></marquee></span></td>
        </tr>
        <tr height="20" class="TR_STYLE1">
            <td class="TD_STYLE3">
                <div id="loaddiv" style="display:none;border:1px solid red; height:20px;background-color: #FF0033;width:63%;float :left ;"></div>
                <div class="DIV_STYLE1">
                    &nbsp;<input type="button" onmouseover="this.className='btn3_mouseover'" onmouseout="this.className='btn3_mouseout'" onmousedown="this.className='btn3_mousedown'" onmouseup="this.className='btn3_mouseup'" class="btn3_mouseout" value="通过复核" onclick="upa(this)">
                    <%--<input type="reset" onmouseup="this.className='btn3_mouseup'" class="btn3_mouseout" value="返回" onclick="history.back()"></div>--%>
                &nbsp;<input type="button" onmouseover="this.className='btn3_mouseover'" onmouseout="this.className='btn3_mouseout'" onmousedown="this.className='btn3_mousedown'" onmouseup="this.className='btn3_mouseup'" class="btn3_mouseout" value="复核不通过" onclick="upa(this)">
            </td>
        </tr>
        </tbody></table>
    <form style="height:780px" id="ff">
    <table bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000" border="0" cellspacing="1" cellpadding="1" bgcolor="#EEEEEE" align="center" class="TABLE_STYLE1" id="theObjTable">
        <tbody><tr><td colspan="4"><div style="width:100%; height:12; padding:3px; color:#FFFFFF; font-weight:bold ">主信息</div></td></tr>
        <tr height="20" class="TR_STYLE1">
        <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">产品编号</td>
        <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="37.4%"><input type="text" class="INPUT_STYLE1" name="productId" style="width:80%" readonly="readonly"></td>
        </tr>
        <tr height="20" class="TR_STYLE1">
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%"><font color="red">*</font>产品名称</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="37.4%"><input id="validator_dup" type="text" class="INPUT_STYLE1" style="width:80%" name="productName"></td>
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">制造商</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="37.4%"><input type="text" class="INPUT_STYLE1" name="factoryName" style="width:80%"></td>
        </tr>
        <tr height="20" class="TR_STYLE1">
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%"><font color="red">*</font>I级分类</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%">
                <select class="SELECT_STYLE1" name="firstKindName" style="width:49%">
                    <option value="">&nbsp;</option>
                    <option value="电子">01/电子</option>
                </select>
            </td>
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%"><font color="red">*</font>II级分类</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%">
                <select class="SELECT_STYLE1" name="secondKindName" style="width:49%">
                    <script language="JavaScript">
                        //if (mutiValidation.select1.value){ 如果select1没做出选择时，想让select2的值为空，则加上这个条件
                        //changelocation(mutiValidation.select1.value)
                        //}
                    </script><option value=""></option><option value="计算机">01/计算机</option>
                </select>
            </td>
        </tr>
        <%--<tr height="20" class="TR_STYLE1">--%>
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%"><font color="red">*</font>III级分类</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%">
                <select class="SELECT_STYLE1" name="thirdKindName" style="width:49%">
                    <script language="JavaScript">
                        //if (mutiValidation.select2.value){ 如果select2没做出选择时，想让select3的值为空，则加上这个条件
                       // changelocation1(mutiValidation.select2.value)
                        //}
                    </script><option value=""></option><option value="服务器">01/服务器</option>
                </select>
            </td>
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">产品简称</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%"><input type="text" class="INPUT_STYLE1" name="productNick" style="width:49%"></td>
        <%--</tr>--%>
        <tr height="20" class="TR_STYLE1">
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">用途类型</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%">
                <select class="SELECT_STYLE1" name="type" style="width:49%">
                    <option value=""></option>
                    <option value="Y001-1">商品</option>
                    <option value="Y001-2">物料</option>
                    <option value="Y001-3">部件</option>
                    <option value="Y001-4">委外部件</option>
                    <option value="Y001-5">外购商品</option>
                    <option value="Y001-6">受托产品</option>
                    <option value="Y001-7">服务型产品</option>
                </select>
            </td><td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">档次级别</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%">
                <select class="SELECT_STYLE1" name="productClass" style="width:49%">
                    <option value=""></option>
                    <option value="D001-1">高档</option>
                    <option value="D001-2">中档</option>
                    <option value="D001-3">低档</option>
                </select>
            </td>
        </tr>
        <tr height="20" class="TR_STYLE1">
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">计量单位</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%"><input type="text" class="INPUT_STYLE1" name="personalUnit" style="width:49%"></td>
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">计量值</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%"><input type="text" class="INPUT_STYLE1" name="personalValue" style="width:49%"></td>
        </tr>
        <tr height="20" class="TR_STYLE1">
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%"><font color="red">*</font>市场单价(元)</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%"><input type="text" class="INPUT_STYLE1" name="listPrice" style="width:49%"></td>
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%"><font color="red">*</font>计划成本单价 </td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%"><input class="INPUT_STYLE1" name="costPrice" type="text" style="width:49%"></td>
        </tr>
        <tr><td colspan="4"><div style="width:100%; height:12; padding:3px; color:#FFFFFF; font-weight:bold ">辅助信息</div></td></tr>

        <tr height="20" class="TR_STYLE1">
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">保修期</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%"><input type="text" class="INPUT_STYLE1" name="warranty" style="width:49%"></td>
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">替代品名称</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%"><input type="text" class="INPUT_STYLE1" name="twinName" style="width:49%"></td>
        </tr>
        <tr height="20" class="TR_STYLE1">
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">替代品编号 </td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%"><input type="text" class="INPUT_STYLE1" name="twinId" style="width:49%"></td>
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">生命周期(年)</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%"><input type="text" class="INPUT_STYLE1" name="lifecycle" style="width:49%"></td>
        </tr>
        <%--<tr height="20" class="TR_STYLE1">--%>
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">单位</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%"><input type="text" class="INPUT_STYLE1" name="amountUnit" style="width:49%"></td>
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">产品经理</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%"><select class="SELECT_STYLE1" name="responsiblePerson" style="width:66%"><script language="JavaScript">
                //if (mutiValidation.select2.value){ 如果select2没做出选择时，想让select3的值为空，则加上这个条件
                //changelocation2(mutiValidation.select3.value)
                //}
            </script><option value=""></option>
                <option value="aa">aa</option>
            </select></td>
      <%--  </tr>--%>
        <tr height="20" class="TR_STYLE1">
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE7" width="11%" height="65">供应商集合 &nbsp; </td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%">
                <textarea rows="4" class="TEXTAREA_STYLE1" name="providerGroup"></textarea>
            </td>
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE7" width="11%" height="65">产品描述 &nbsp; </td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%">
                <textarea rows="4" class="TEXTAREA_STYLE1" name="productDescribe"></textarea>
            </td>
        </tr>
        <tr height="20" class="TR_STYLE1">
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">登记人</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%"><input type="text" class="INPUT_STYLE1" style="width:49%" name="register" value="${login_id}" readonly="readonly"></td>
            <td bgcolor="#f0f8ff" bordercolorlight="#000000" bordercolordark="#000000" align="right" class="TD_STYLE1" width="11%">建档时间</td>
            <td valign="top" bgcolor="#eeeeee" bordercolor="#000000" class="TD_STYLE2" width="13%"><input name="registerTime"  width="100%" ></td>
        </tr>
        </tbody></table>
    <input type="hidden" <%--name="sumbit_submit" --%>value="">
</form>
</body>
<script src="/js/jquery.form.js"></script>
<script src="/js/jquery.serializejson.js"></script>
<script>
    var Dfid;
        $.get("http://localhost:8080/dfile/findDfileById?id="+${fhId},function (data) {
            Dfid=data.id;
            $("[name=productId]").val(data.productId);
            $("[name=productName]").val(data.productName);
            $("[name=factoryName]").val(data.factoryName);
            $("[name=firstKindName]").val(data.firstKindName);
            $("[name=secondKindName]").val(data.secondKindName);
            $("[name=thirdKindName]").val(data.thirdKindName);
            $("[name=productNick]").val(data.productNick);
            $("[name=type]").val(data.type);
            $("[name=productClass]").val(data.productClass);
            $("[name=personalUnit]").val(data.personalUnit);
            $("[name=personalValue]").val(data.personalValue);
            $("[name=listPrice]").val(data.listPrice);
            $("[name=costPrice]").val(data.costPrice);
            $("[name=warranty]").val(data.warranty);
            $("[name=twinName]").val(data.twinName);
            $("[name=twinId]").val(data.twinId);
            $("[name=lifecycle]").val(data.lifecycle);
            $("[name=amountUnit]").val(data.amountUnit);
            $("[name=responsiblePerson]").val(data.responsiblePerson);
            $("[name=providerGroup]").val(data.providerGroup);
            $("[name=productDescribe]").val(data.productDescribe);
            $("[name=register]").val(data.register);
            $("[name=registerTime]").val(data.registerTime);
        })

    function upa(th) {
        var isok;
        if(th.value=="通过复核"){
            isok="S001-1";
        }else {
            isok="S001-2";
        }
        let productId=document.getElementsByName("productId")[0].value;
        console.log(productId+"~~~~~~")
        $.get("http://localhost:8080/dfile/upDFileById?id="+Dfid+"&status="+isok,function (data) {
            console.log(12345678)
            window.location="/jy/loginReview.jsp";
        })
    }
</script>
</html>
